#include "McsHead.h"

McsHead::McsHead(int width_, int height_, int frameCount_, bool isWithShadow, bool isWithRemap) : width(width_), height(height_), frameCount(frameCount_)
{
    if(isWithShadow)
        McsType |= Shadow;
    if(isWithRemap)
        McsType |= Remap;
}

bool McsHead::TryLoad(std::istream& i)
{
    Load(i, width);
    Load(i, height);
    Load(i, frameCount);
    Load(i, McsType);
    return true;
}

bool McsHead::TryDump(std::ostream &o)
{
    Dump(o, width);
    Dump(o, height);
    Dump(o, frameCount);
    Dump(o, McsType);
    return true;
}

bool McsHead::IsDumpable()
{
    return !(!width || !height || !frameCount);
}
